package thread;

import java.util.Random;

public class ThreadThreadTest {

	/**
	 * @param args
	 */
	static Random random = new Random();

	static int count =0;
	
	public static void main(String[] args) {
		new One().start();
		new Two().start();
		new Three().start();
	}	

	static class One extends Thread {
		@Override
		public void run() {
			while(true){
				System.out.print(".");
				ThreadThreadTest.count++;
				if(ThreadThreadTest.count>100)
				break;
			}		
		}
	}

	static class Two extends Thread {
		@Override
		public void run() {
			while(true){
				System.out.print("#");
				ThreadThreadTest.count++;
				if(ThreadThreadTest.count>100)
				break;
			}		
		}
	}

	static class Three extends Thread {
		@Override
		public void run() {
			while(true){
				System.out.print("*");
				ThreadThreadTest.count++;
				if(ThreadThreadTest.count>100)
				break;
			}		
		}
	}

}
